<%@ page language="java" contentType="text/html; charset=UTF-8"
	pageEncoding="UTF-8"%>
<%
	String path = request.getContextPath();//获得项目的根目录，上下文路径
	String basePath = request.getScheme() + "://" + request.getServerName() + ":" + request.getServerPort()
			+ path + "/";
%>
<!DOCTYPE html>
<html>
<head>
<base href="<%=basePath%>">
<meta charset="UTF-8">
<title>addDetail</title>
<script type="text/javascript" src="js/jquery.js"></script>
<script>
	$(function() {
		$.get("sort/getSort", function(res) {
			var sel = $("#sel");
			$(res).each(
					function() {
						var option = "<option value='"+this.id+"'>" + this.name
								+ "</option>";
						sel.append(option);
					});
		}, 'json');
	});
</script>
</head>
<body>
	<div align="center">
		<h2>发布新帖</h2>
		<form method="get" action="detail/addDetail">
			<table border="1" cellpadding="0" cellspacing="0" style="width: 30%"
				align="center">
				<tr>
					<td>发布版区：</td>
					<td><select name="sortId" id="sel">
					</select></td>
				</tr>
				<tr>
					<td><span>作者：</span></td>
					<td><input type="text" name="author" /></td>
				</tr>
				<tr>
					<td><span>标题：</span></td>
					<td><input type="text" name="title" /></td>
				</tr>
				<tr>
					<td><span>详细类容：</span></td>
					<td>
					<textarea name="detail"></textarea>
				</tr>
				<tr>
					<td><input type="submit" class="submit" /></td>
					<td><input type="reset" class="reset" /></td>
				</tr>
			</table>
		</form>
	</div>


</body>
</html>